<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Number类型parseInt函数解析返回两个值</title>
</head>
<body>
    <script>
        // parseInt 整数
        // parseInt 浮点数
        console.log(parseInt(""));   //返回NaN
        console.log(parseInt("3.14"));   //返回3
        console.log(parseInt("4.12"));   //返回4
        console.log(parseInt("abc123"));   //返回NaN
        console.log(parseInt("123abc"));   //返回123
    </script>
</body>
</html>